<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/8/7
 * Time: 9:14
 */
namespace  Admin\Model;
use Base\Model\BaseModel;

class  InspectioncontentModel extends  BaseModel{
    protected $dbName = 'transplant_manager0';
    protected $_link=array(
//        //化验项ID
//        'inspection_index' => array(
//            'mapping_type' => self::BELONGS_TO,
//            'foreign_key' => 'indexid',
//            'parent_key' => 'id',
////            'mapping_fields' => 'id,name'
//        ),
        //子项
        'inspectioniteminfo' => array(
            'mapping_type' => self::BELONGS_TO,
            'foreign_key' => 'itemid',
            'parent_key' => 'id',
            'mapping_fields' => 'id,name'
        ),
        //化验单
        'inspectioninfo' => array(
            'mapping_type' => self::BELONGS_TO,
            'foreign_key' => 'testid',
            'parent_key' => 'id',
            'mapping_fields' => 'id,name'
        ),
    );
}